package com.cloud.common.entity;

import java.io.Serializable;
import java.util.List;

/**
 * 表格分页数据对象
 *
 * @author yzj
 */
public class TableDataInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 当前页
     */
    private int current;

    /**
     * 每页显示条数
     */
    private int size;

    /**
     * 总记录数
     */
    private long total;

    /**
     * 列表数据
     */
    private List<?> rows;

    /**
     * 表格数据对象
     */
    public TableDataInfo() {
    }

    /**
     * 分页
     *
     * @param current 当前页
     * @param size    每页显示条数
     * @param total   总记录数
     * @param rows    列表数据
     */
    public TableDataInfo(int current, int size, int total, List<?> rows) {
        this.current = current;
        this.size = size;
        this.total = total;
        this.rows = rows;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public int getCurrent() {
        return current;
    }

    public void setCurrent(int current) {
        this.current = current;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(long total) {
        this.total = total;
    }

    public List<?> getRows() {
        return rows;
    }

    public void setRows(List<?> rows) {
        this.rows = rows;
    }
}
